Skip to main content

Controllers

In configuration 'application.yml', we configure the servlet context-path with '/api', so all urls will start with /api.

For CRUD operations, we already have a CRUDController class that has all the endpoints for each operation. All you need to do is create a child class, give the required repository and define the base-url for your controller.

image.png

Each end-point is calling for the corresponding repository function.

The functions getAll(SortingParams) and getAllOptions are not mapped by default, you should only map them when you need them.

“getAllOptions” is the endpoint for select components in the front, you will get the value and the label to use for select components by using finder.

getAll(SortingParams) gets all the entities without paging.